<?php
/**@var \Weline\Framework\View\Template $this */

/**@var \Weline\Backend\Block\ThemeConfig $themeConfig */

use Weline\Framework\Manager\ObjectManager;

$themeConfig = ObjectManager::getInstance(\Weline\Backend\Block\ThemeConfig::class);
?>
<!DOCTYPE html>
<!--
 *@Author       秋枫雁飞
 *@Email        aiweline@qq.com
 *@Forum        https://bbs.aiweline.com
 *@DESC         后台共用头部
-->
<html lang='en' <?= ('rtl' === $themeConfig->getThemeModel()) ? " dir=\"rtl\"" : '' ?>>
<head>
    @template(Weline_Admin::common/head.phtml)
    <title><?= __('阿里云DDns动态域名解析管理') ?></title>
    <!-- twitter-bootstrap-wizard css -->
    <link rel='stylesheet' href='@static(Weline_Admin::assets/libs/twitter-bootstrap-wizard/prettify.css)'>
    <!-- Sweet Alert-->
    <link href='@static(Weline_Admin::assets/libs/sweetalert2/sweetalert2.min.css)' rel='stylesheet' type='text/css'/>
</head>

<body <?= $themeConfig->getLayouts() ?? ''; ?> class='bg-transparent'>

<!--页头工具条 开始-->
@template(Weline_Admin::common/page/loading.phtml)
<!--页头工具条 结束-->

<!-- 开始 页面 -->
<div id="layout-wrapper overflow-hidden">
    <!-- start page message -->
    <div class='row'>
        <template>Weline_Component::message.phtml</template>
    </div> <!-- end message -->
    <div class='card'>
        <div class='card-body overflow-hidden'>
            <form class="form" action="@backend-url('*/backend/ddnslist/')@if{ddns.ddns_domain_id=>'edit'|'add'}" method="post">
                <notempty name="ddns">
                    <input type="hidden" id="ddns_domain_id" name="ddns_domain_id" value="{{ddns.ddns_domain_id}}">
                    <input type="hidden" id="id" name="id" value="{{ddns.ddns_domain_id}}">
                </notempty>
                <div class='form-group row'>
                    <label for='domain' class='col-sm-2 col-form-label'>域名</label>
                    <div class='col-sm-10'>
                        <input type='text' class='form-control' id='domain' name="domain" placeholder='请输入域名' value="{{ddns.domain}}">
                    </div>
                </div>
                <div class='form-group row'>
                    <label for='host_name' class='col-sm-2 col-form-label'>主机名称</label>
                    <div class='col-sm-10'>
                        <input type='text' class='form-control' id='host_name' name="host_name" placeholder='请输入主机名称' value="{{ddns.host_name}}">
                    </div>
                </div>
                <div class='form-group row'>
                    <label for='interval' class='col-sm-2 col-form-label'>时间间隔（分钟数）</label>
                    <div class='col-sm-10'>
                        <input type='text' class='form-control' id='interval' name="interval" placeholder='请输入时间间隔' value="{{ddns.interval}}">
                    </div>
                </div>
                <div class='form-group row'>
                    <legend class='col-form-label col-sm-2 pt-0'>启用 IPv4 解析</legend>
                    <div class='col-sm-10 checkbox-inline'>
                        <div class='form-check'>
                            <input class='form-check-input' type='radio' name='ipv4_flag' id='ipv4_flag1' value='1'
                                   @if{ddns.ipv4_flag=='1'=>'checked'}>
                            <label class='form-check-label' for='ipv4_flag1'>启用</label>
                        </div>
                        <div class='form-check'>
                            <input class='form-check-input' type='radio' name='ipv4_flag' id='ipv4_flag2' value='0'
                                   @if{ddns.ipv4_flag=='0'=>'checked'}>
                            <label class='form-check-label' for='ipv4_flag2'>关闭</label>
                        </div>
                    </div>
                </div>
                <div class='form-group row'>
                    <legend class='col-form-label col-sm-2 pt-0'>启用 IPv6 解析</legend>
                    <div class='col-sm-10 checkbox'>
                        <div class='form-check'>
                            <input class='form-check-input' type='radio' name='ipv6_flag' id='ipv6_flag1' value='1'
                                   @if{ddns.ipv6_flag=='1'=>'checked'}>
                            <label class='form-check-label' for='ipv6_flag1'>启用</label>
                        </div>
                        <div class='form-check'>
                            <input class='form-check-input' type='radio' name='ipv6_flag' id='ipv6_flag2' value='0'
                                   @if{ddns.ipv6_flag=='0'=>'checked'}>
                            <label class='form-check-label' for='ipv6_flag2'>关闭</label>
                        </div>
                    </div>
                </div>
                <div class='form-group row'>
                    <div class='col-sm-2'>启用</div>
                    <div class='col-sm-10'>
                        <div class='form-check'>
                            <input class='form-check-input' type='radio' name='enable' id='enable1' value='1'
                                   @if{ddns.enable=='1'=>'checked'}>
                            <label class='form-check-label' for='enable1'>是</label>
                        </div>
                        <div class='form-check'>
                            <input class='form-check-input' type='radio' name='enable' id='enable2' value='0'
                                   @if{ddns.enable=='0'=>'checked'}>
                            <label class='form-check-label' for='enable2'>否</label>
                        </div>
                    </div>
                </div>
                <div class='form-group row'>
                    <div class='col-sm-10 offset-sm-2'>
                        <button type='submit' class='btn btn-primary'>提交</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<!-- END layout-wrapper -->
<!--右边栏-->

@template(Weline_Admin::common/footer.phtml)
</body>
</html>
